/*
 * @Author: caozaihui
 * @Date: 2024-11-17 20:43:07
 * @LastEditors: czh 15908754730@163.com
 * @LastEditTime: 2024-11-23 21:03:12
 * @FilePath: \communit-club-front\src\views\brush-questions\components\optionlist.jsx
 */
import { List } from 'antd';

function OptionList({ question }) {
    return (<>
        <List
            bordered
            dataSource={question.optionList}
            renderItem={(item,index) => (
                <List.Item>
                    { [1,2].includes(question.subjectType) ? 
                    <span style={{ display: 'flex' }} dangerouslySetInnerHTML={{__html:String.fromCharCode(65+index)+'、'+item.optionContent }}/> : ''}
                    {item.isCorrect ? (<span style={{ color: '#999999' }}>√</span> ) : (<span style={{ color: '#000000' }}>×</span> ) }
                </List.Item>
            )}
        />
    </>)
}
export default OptionList;